package thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个时间：");
        for (int i = scanner.nextInt(); i > 0; i--) {
            System.out.println("当前时间："+i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        System.out.println("倒计时结束");
        System.out.println("哈哈");
    }
}
